package br.com.persistencia;

import br.com.excecoes.DAOException;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Session;

/**
 *
 * @author Gernan
 */
public interface DaoGeneric<T> {

    T save(T t) throws DAOException;

    T update(T t) throws DAOException;

    T remove(T t) throws DAOException;

    List<T> getAll() throws DAOException;

    Session getSession() throws DAOException ;
    
    Criteria getCriteria() throws DAOException ;
    
    T executeNativeQuerySingleResult(String sql) throws DAOException;
    
    List<T> executeNativeQueryMultiResult(String sql) throws DAOException;
}
